package com.youway.ddd.demo1.domain.bookstore;

import java.util.Optional;

import com.youway.ddd.demo1.domain.Entity;

//实体
public interface Bookshelf extends Entity {

	String getCategory();

	Optional<Space> findBook(String title);

	Space store(Book book, int quantity);

	public interface Space extends Entity {

		Book getBook();

		int getQuantity();

		void take(int amount);
	}

}